#include<libnotify/notify.h>

int main(int argc, char **argv)
{
    // initialize gtk
    gtk_init(&argc,&argv);
    
    char name[40] = "Sample Notification";
    
    // initiate notify
    notify_init(name);
    
    // create a new notification
    NotifyNotification *example;
    example = notify_notification_new(name,"Checking it out",NULL,NULL);
    
    /*  Status Icon is not working properly */
    // create an icon for the notification
    GtkStatusIcon *icon = gtk_status_icon_new_from_stock (GTK_STOCK_YES);
    gtk_status_icon_set_visible(icon,TRUE);
    // attach that icon to the notification
    notify_notification_attach_to_status_icon (example,icon);
    
    // set the timeout of the notification to 3 secs
    notify_notification_set_timeout(example,3000);
    
    // set the category so as to tell what kind it is
    char category[30] = "Testing Notifications";
    notify_notification_set_category(example,category);
    
    // set the urgency level of the notification
    notify_notification_set_urgency (example,NOTIFY_URGENCY_CRITICAL);
    
    GError *error = NULL;
    notify_notification_show(example,&error);

}
